import request from '@/utils/modules/https.js'

// 查询本周课表
export const getScheduleList = (data) => {
	return request({
		url: '/schedule/getScheduleList',
		data,
		method: 'post',
		header: {
			'content-type': 'application/json'
		}
	})
}

// 查询本学期的周次
export const getWeekList = (data) => {
	return request({
		url: '/schedule/getWeekList',
		data,
		method: 'get'
	})
}

// 移除课表
export const delScheduleById = (data) => {
	return request({
		url: '/schedule/delScheduleById',
		data,
		method: 'post',
		header: {
			'content-type': 'application/json'
		}
	})
}

// 恢复课程
export const restoreScheduleById = (data) => {
	return request({
		url: '/schedule/restoreScheduleById',
		data,
		method: 'post',
		header: {
			'content-type': 'application/json'
		}
	})
}

// 添加课程
export const addScheduleByOpenId = (data) => {
	return request({
		url: '/schedule/addScheduleByOpenId',
		data,
		method: 'post',
		header: {
			'content-type': 'application/json'
		}
	})
}

// 单独同步课表数据
export const synScheduleData = (data) => {
	return request({
		url: '/schedule/synScheduleData',
		data,
		method: 'post',
		header: {
			'content-type': 'application/json'
		}
	})
}

// 获取今日课表
export const getTodayScheduleList = (data) => {
	return request({
		url: '/schedule/getTodayScheduleList',
		data,
		method: 'post',
		header: {
			'content-type': 'application/json'
		}
	})
}